package com.rd.student.jike.class2.lihongming.week724_730.Day725;

import java.io.*;
import java.nio.file.Files;

/**
 * @Auther:Heinrich
 * @Date:2023/7/25-07-25-14:55
 * @Description:c230725
 * @version:1.0
 */
public class TestInput {
    public static void main(String[] args) throws IOException {
        File file = new File("C:\\Users\\30578\\Desktop\\原桌面\\2021-2-3#原\\2021-2-3#(2).docx");
        InputStream is = Files.newInputStream(file.toPath());
        byte[] bytes = new byte[Integer.parseInt(String.valueOf(file.length()))];
        is.read(bytes);
        System.out.println(bytes[50003]);
        System.out.println(file.length());
        File file1 = new File("s23copy.text");
        OutputStream os = new FileOutputStream(file1);

        os.write(bytes);
        os.close();
        is.close();
    }
}
